<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="采购计划" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addPlan(0)"
                        ng-disabled="!btnPermission.purchasePlanAdd"
                        title="{{!btnPermission.purchasePlanAdd?'无权限执行此操作':''}}">新增</button>
                    <button class="btn btn-operate m-r-sm" ng-click="importPlan()">导入采购计划</button>
                    <button class="btn btn-operate m-r-sm" ng-click="addPlan(1)" ng-if="!isWJ">缺货新增</button>
                    <span ng-if="isWJ">
                        <button class="btn btn-operate m-r-sm" ng-click="addPlan(2)">补库汇总新增</button>
                        <button class="btn btn-operate m-r-sm" ng-click="addPlan(3)">紧急汇总新增</button>
                        <button class="btn btn-operate m-r-sm" ng-click="rejectSummary()">驳回汇总</button>
                    </span>
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                            ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                        <div class="btn btn-default base-color">
                            <div title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <li yb-download download-url="exportParam.sectionUrl"
                                    download-param="exportParam.sectionParam" download-key="ids">
                                    <i class="yb-icon ico-export-o"></i> 导出
                                </li>
                                <li yb-download download-url="exportParam.allUrl" download-param="condition"
                                    download-duration="3">
                                    <i class="yb-icon ico-export-o"></i> 导出全部
                                </li>
                            </ul>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs"
                        ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="采购计划单号"
                            ng-model="condition.planOrder">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
                reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">采购计划单号：</label>
                        <input type="text" ng-model="condition.planOrder" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">申请人：</label>
                        <input type="text" ng-model="condition.createName" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">申请部门：</label>
                        <input type="text" ng-model="condition.deptName" class="form-control">
                    </div>
                    <div search-purchase-type first-level-model="condition.typeId"
                        second-level-model="condition.purchaseTypeChildId"></div>
                    <div class="form-group clearfix">
                        <label class="control-label">审核状态：</label>
                        <select class="form-control" ng-model="condition.auditStatus"
                            ng-options="item.code as item.name for item in auditStatusList">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">创建采购单：</label>
                        <select class="form-control" ng-model="condition.sendStatus"
                            ng-options="item.code as item.name for item in sendStatusList">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label">申请时间：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.createDateStart"
                            datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(0)"
                            is-open="datePickerFlag[0]" close-text="关闭"
                            ng-change="checkDate(condition, 'createDateStart', 'createDateEnd')" modal-size="small"
                            readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.createDateEnd"
                            datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(1)"
                            is-open="datePickerFlag[1]" close-text="关闭"
                            ng-change="checkDate(condition, 'createDateStart', 'createDateEnd')" modal-size="small"
                            readonly>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="true"
                has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="text-center th-check border-l-none">
                                        <div yb-check-box yb-checked="markInfo.allCheckedBill"
                                            yb-click="selectAll(dataList, 'Bill')"></div>
                                    </th>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-click="toSort(tableConfig.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth"
                                            fixed-width="tbStyle.billFixedWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-click="toSort(tableConfig.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth">
                                        </div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.cueRow}"
                                    ng-click="selectRow($index)">
                                    <td width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="item.isChecked"
                                            yb-click="selectSingle(item, dataList, 'Bill')"></div>
                                    </td>
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <div class="font-0" ng-if="itemCol.type === 'operate'">
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="auditPlan(item)"
                                                ng-disabled="!btnPermission.purchasePlanAudit || item.auditStatus != 0 || (item.stockOutFlag==1&&item.stockOuter!=curUser.userId)"
                                                title="{{!btnPermission.purchasePlanAudit?'无权限执行此操作':''}}">审核</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="editPlan(item)"
                                                ng-disabled="item.auditStatus === 1 || !btnPermission.purchasePlanEdit"
                                                title="{{!btnPermission.purchasePlanEdit?'无权限执行此操作':''}}">编辑</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="delPlan(item)"
                                                ng-disabled="item.sendStatus != 0 || !btnPermission.purchasePlanDel"
                                                title="{{!btnPermission.purchasePlanDel?'无权限执行此操作':''}}">删除</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="manualFinish(item.id)"
                                                ng-disabled="!btnPermission.purchasePlanManualFinish || item.finishState == '2'"
                                                title="{{!btnPermission.purchasePlanManualFinish?'无权限执行此操作':''}}">结单</button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.cueRow}"
                                    ng-click="selectRow($index)">
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span ng-if="!itemCol.clickFn">{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allCheckedBill" yb-check-name="全选"
                    yb-click="selectAll(dataList, 'Bill')"></div>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <!-- 新增计划第一步 -->
        <div tab heading="{{tabFlag.name}}" active="activeFlag[1]" ng-if="activeFlag[1]">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="materiels.search()"
                            title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearchAdd')">
                        高级搜索
                    </button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="零件编号"
                            ng-model="materiels.condition.materialsNo">
                        <span class="input-group-addon cursor-pointer" ng-click="materiels.search(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearchAdd"
                search-data="materiels.search(1)" reset-data="materiels.reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">零件编号：</label>
                        <textarea ng-model="materiels.condition.materialsNos" class="form-control"
                            placeholder="逗号分隔或者换行分隔">
                        </textarea>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">零件中文名：</label>
                        <input type="text" class="form-control" placeholder="零件中文名"
                            ng-model="materiels.condition.materialsDes">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">采购组：</label>
                        <input type="text" class="form-control" placeholder="采购组"
                            ng-model="materiels.condition.purchaseGroup">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">出库频次：</label>
                        <input type="text" class="form-control" style="width:60px;" yb-number-input
                            ng-model="materiels.condition.salesRateMin">
                        <span style="float: left;margin-top: 8px;">——</span>
                        <input type="text" class="form-control" style="width:60px;" yb-number-input
                            ng-model="materiels.condition.salesRateMax">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <label class="col-xs-8 control-label p-l-n text-left" style="width: 190px;">
                            <div yb-check-box yb-checked="materiels.condition.monthRequire" yb-check-name="月度需求数量大于0">
                            </div>
                        </label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <label class="col-xs-8 control-label p-l-n text-left" style="width: 190px;">
                            <div yb-check-box yb-checked="materiels.condition.urgentRequire" yb-check-name="紧急需求数量大于0">
                            </div>
                        </label>
                    </div>
                </div>
            </div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{materiels.tableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="text-center th-check border-l-none">
                                        <div yb-check-box yb-checked="materiels.markInfo.allCheckedBill"
                                            yb-click="materiels.selectAll(materiels.dataList, 'Bill')"></div>
                                    </th>
                                    <th ng-repeat="itemCol in materiels.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-click="materiels.toSort(materiels.tableConfig.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="materiels.tableConfig.fixedWidth"
                                            fixed-width="materiels.tbStyle.billFixedWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="materiels.tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{materiels.tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in materiels.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-click="materiels.toSort(materiels.tableConfig.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="materiels.tableConfig.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="materiels.dataList.length > 0">
                        <table class="table-fixed border-none" width="{{materiels.tableConfig.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in materiels.dataList track by $index"
                                    ng-class="{'row-selected': $index === materiels.markInfo.cueRow}"
                                    ng-click="materiels.selectRow($index)">
                                    <td width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="item.isChecked"
                                            yb-click="materiels.selectSingle(item, materiels.dataList, 'Bill')"></div>
                                    </td>
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in materiels.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span>{{item[itemCol.dataField]}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="materiels.dataList.length > 0"
                        ng-style="materiels.tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{materiels.tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in materiels.dataList track by $index"
                                    ng-class="{'row-selected': $index === materiels.markInfo.cueRow}"
                                    ng-click="materiels.selectRow($index)">
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in materiels.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span>{{item[itemCol.dataField]}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="materiels.dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar text-center wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm pull-left" yb-checked="materiels.markInfo.allCheckedBill"
                    yb-check-name="全选" yb-click="materiels.selectAll(materiels.dataList, 'Bill')"></div>
                <button type="button" class="btn btn-primary" ng-disabled="buyPlan.formInfo.materialList.length==0"
                    ng-click="nextStep()">下一步
                </button>
                <div yb-page-info ng-model="materiels.pageInfo" yb-refresh="materiels.search()"></div>
            </div>
        </div>
        <!-- 新增计划第二步、编辑计划 -->
        <div tab heading="{{tabFlag.name}}" active="activeFlag[2]" ng-if="activeFlag[2]">
            <form name="buyPlanForm" class="m-t-sm form-horizontal form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm" ng-if="tabFlag.type === 2">
                    <label class="col-xs-4 control-label max-w-100">采购计划单号：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{buyPlan.formInfo.headerInfo.planOrder || '-'}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">申请人：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{buyPlan.formInfo.headerInfo.createName || '-'}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">申请部门：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{buyPlan.formInfo.headerInfo.deptName || '-'}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">申请时间：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{buyPlan.formInfo.headerInfo.createDate | YbDate:"yyyy-MM-dd HH:mm:ss"}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>采购方式：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div select-purchase-type first-level-model="buyPlan.formInfo.headerInfo.typeId"
                            second-level-model="buyPlan.formInfo.headerInfo.purchaseTypeChildId"
                            parent-type-name="buyPlan.formInfo.headerInfo.typeDesc"
                            child-type-name="buyPlan.formInfo.headerInfo.purchaseTypeChildName"
                            stock-type="buyPlan.formInfo.headerInfo.stockOutFlag"></div>
                        <div class="msg-block"
                            ng-if="buyPlanForm.purchaseType.$dirty || (buyPlanForm.purchaseType.$invalid && buyPlan.submitted)">
                            <div class="error-msg"
                                ng-if="buyPlanForm.purchaseType.$error.required && !buyPlanForm.purchaseType.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                        <div class="msg-block" style="left: 100px;"
                            ng-if="buyPlanForm.secondPurchaseType.$dirty || (buyPlanForm.secondPurchaseType.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="buyPlanForm.secondPurchaseType.$error.required && !buyPlanForm.secondPurchaseType.focused">
                                <div class="msg-triangle"></div>
                                <span translate>必填项，请填写</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="buyPlan.formInfo.headerInfo.stockOutFlag==1">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>采购员：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" class="form-control light-bg" required
                            ng-model="buyPlan.formInfo.headerInfo.stockOuterName" ng-click="selectStockOuter()"
                            readonly placeholder="请选择">
                        <div class="msg-block" ng-if="!buyPlan.formInfo.headerInfo.stockOuterName && buyPlan.submitted">
                            <div class="error-msg">
                                <div class="msg-triangle"></div>
                                请选择采购员
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="note" class="form-control" ng-model="buyPlan.formInfo.headerInfo.note"
                            maxlength="200">
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">审核意见：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{buyPlan.formInfo.headerInfo.auditNote || '-'}}
                    </label>
                </div>
            </form>
            <div class="row wrapper-y-xs" ng-if="buyPlan.formInfo.headerInfo.stockOutFlag!=1">
                <div class="col-xs-12 operate-bar font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="importMateriel()">导入零件</button>
                </div>
            </div>
            <div class="main-area d-b-60" style="top: 170px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{buyPlan.tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th width="60" class="text-center">
                                        操作
                                    </th>
                                    <th ng-repeat="itemCol in buyPlan.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-hide="itemCol.dataField=='deliveryDate'&&tabFlag.type==1">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="buyPlan.tableConfig.targetWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="buyPlan.formInfo.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{buyPlan.tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in buyPlan.formInfo.materialList track by $index">
                                    <td width="60">
                                        <button type="button" class="btn btn-operate"
                                            ng-click="buyPlan.delMateriel($index)">删除</button>
                                    </td>
                                    <td ng-repeat="itemCol in buyPlan.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                        <div class="spill-dots" ng-if="!itemCol.needInput">
                                            {{item[itemCol.dataField]}}
                                        </div>
                                        <div ng-if="!!itemCol.needInput && itemCol.inputType === 'supplierName'"
                                            class="td-edit pos-r">
                                            <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                                ng-class="{'error': item.supplierErr}">
                                        </div>
                                        <div ng-if="!!itemCol.needInput && itemCol.inputType === 'qty'"
                                            class="td-edit pos-r">
                                            <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                                ng-change="checkQty(item)"
                                                ng-focus="showErrTip(item)" ng-blur="hideErrTip(item)"
                                                yb-number-input max="99999.999"
                                                disable-decimal="false" decimal-places="3"
                                                ng-class="{'error': item.qtyErr||item.qtyErrLack}">
                                            <div class="pos-a tool-tips" ng-if="item.qtyShowErr&&item.qtyErr">
                                                <i class="triangle"></i>
                                                <div class="msg">数量不能为空和0</div>
                                            </div>
                                            <div class="pos-a tool-tips" ng-if="item.qtyShowErr&&item.qtyErrLack">
                                                <i class="triangle"></i>
                                                <div class="msg">数量不能少于所选单据缺货总数量:{{item.qtyOrigin}}</div>
                                            </div>
                                        </div>
                                        <div ng-if="!!itemCol.needInput && itemCol.inputType === 'price'" class="td-edit pos-r">
                                            <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                                yb-number-input max="99999999.99"
                                                disable-decimal="false" decimal-places="2">
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="buyPlan.formInfo.materialList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center border-t clearfix">
                <button type="button" class="btn btn-default m-r-sm" ng-click="prevStep()">上一步
                </button>
                <button type="button" class="btn btn-primary m-r-sm" ng-click="buyPlan.saveData(buyPlanForm.$valid)">提交
                </button>
                <button type="button" class="btn btn-default" ng-click="changeTab(0)">取消</button>
            </div>
        </div>
        <div tab heading="审核" active="activeFlag[3]" ng-if="activeFlag[3]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.createName||'-'}}">
                        {{buyPlan.formInfo.headerInfo.createName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请部门：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{buyPlan.formInfo.headerInfo.deptName||'-'}}">
                        {{buyPlan.formInfo.headerInfo.deptName||'-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(buyPlan.formInfo.headerInfo.createDate | YbDate:'yyyy-MM-dd HH:mm:ss')||'-'}}">
                        {{(buyPlan.formInfo.headerInfo.createDate | YbDate:"yyyy-MM-dd HH:mm:ss") || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购方式：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.purchaseTypeChildName ? buyPlan.formInfo.headerInfo.purchaseTypeChildName : (buyPlan.formInfo.headerInfo.typeDesc ||'-')}}">
                        {{buyPlan.formInfo.headerInfo.purchaseTypeChildId ? buyPlan.formInfo.headerInfo.typeDesc + "-" + buyPlan.formInfo.headerInfo.purchaseTypeChildName : buyPlan.formInfo.headerInfo.typeDesc}}
                    </div>
                </div>
                <!-- <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">供货商：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.supplierName ||'-'}}">
                        {{buyPlan.formInfo.headerInfo.supplierName || "-"}}
                    </div>
                </div> -->
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{buyPlan.formInfo.headerInfo.note ||'-'}}">
                        {{buyPlan.formInfo.headerInfo.note || "-"}}
                    </div>
                </div>
            </div>
            <div class="panel-bar pos-a clearfix" style="left:0;right: 240px;">
                <div class="pull-left">
                    <i></i>零件信息
                </div>
            </div>
            <div class="panel-bar pos-a clearfix" style="right: 0; width: 225px;">
                <div class="pull-left">
                    <i></i>审核意见
                </div>
            </div>
            <div class="main-area d-b-60" style="top:146px; right: 240px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{buyPlan.tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in buyPlan.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="buyPlan.tableConfig.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="buyPlan.formInfo.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{buyPlan.tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in buyPlan.formInfo.materialList track by $index">
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in buyPlan.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                        {{item[itemCol.dataField]}}
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="buyPlan.formInfo.materialList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="main-area d-b-60" style="top:146px; left: auto; width: 225px;">
                <div class="main-wrap p-b-lg over-flow-h">
                    <textarea yb-word-count max-size="100" name="auditNote" class="form-control full"
                        ng-model="buyPlan.formInfo.headerInfo.auditNote"
                        ng-class="{'error': !buyPlan.formInfo.headerInfo.auditNote && submitted}"
                        placeholder="审核意见"></textarea>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary m-r-sm"
                    ng-click="saveAuditPlan('pass', buyPlan.formInfo.headerInfo.id, buyPlan.formInfo.headerInfo.auditNote)">通过</button>
                <button type="button" class="btn btn-primary m-r-sm"
                    ng-click="saveAuditPlan('refuse', buyPlan.formInfo.headerInfo.id, buyPlan.formInfo.headerInfo.auditNote)">拒绝</button>
                <button type="button" class="btn btn-default" ng-click="changeTab(0)">取消</button>
            </div>
        </div>
        <div tab heading="详情" active="activeFlag[4]" ng-if="activeFlag[4]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购计划单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.planOrder||'-'}}">
                        {{buyPlan.formInfo.headerInfo.planOrder || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.createName||'-'}}">
                        {{buyPlan.formInfo.headerInfo.createName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请部门：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{buyPlan.formInfo.headerInfo.deptName||'-'}}">
                        {{buyPlan.formInfo.headerInfo.deptName||'-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(buyPlan.formInfo.headerInfo.createDate | YbDate:'yyyy-MM-dd HH:mm:ss')||'-'}}">
                        {{(buyPlan.formInfo.headerInfo.createDate | YbDate:"yyyy-MM-dd HH:mm:ss") || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购方式：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.purchaseTypeChildName ? buyPlan.formInfo.headerInfo.purchaseTypeChildName : (buyPlan.formInfo.headerInfo.typeDesc ||'-')}}">
                        {{buyPlan.formInfo.headerInfo.purchaseTypeChildId ? buyPlan.formInfo.headerInfo.typeDesc + "-" + buyPlan.formInfo.headerInfo.purchaseTypeChildName : buyPlan.formInfo.headerInfo.typeDesc}}
                    </div>
                </div>
                <!-- <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">供货商：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.supplierName ||'-'}}">
                        {{buyPlan.formInfo.headerInfo.supplierName || "-"}}
                    </div>
                </div> -->
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{buyPlan.formInfo.headerInfo.note ||'-'}}">
                        {{buyPlan.formInfo.headerInfo.note || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.auditName ||'-'}}">
                        {{buyPlan.formInfo.headerInfo.auditName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(buyPlan.formInfo.headerInfo.auditDate | YbDate:'yyyy-MM-dd HH:mm:ss')||'-'}}">
                        {{(buyPlan.formInfo.headerInfo.auditDate | YbDate:'yyyy-MM-dd HH:mm:ss')|| "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(buyPlan.formInfo.headerInfo.auditStatus | ProgressStatus:'audit')||'-'}}">
                        {{(buyPlan.formInfo.headerInfo.auditStatus | ProgressStatus:'audit')|| "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核意见：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.auditNote ||'-'}}">
                        {{buyPlan.formInfo.headerInfo.auditNote || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">是否创建采购单：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(buyPlan.formInfo.headerInfo.sendStatus | TrueOrFalse) ||'-'}}">
                        {{(buyPlan.formInfo.headerInfo.sendStatus | TrueOrFalse)|| "-"}}
                    </div>
                </div>
            </div>
            <div class="panel-bar clearfix">
                <div class="pull-left">
                    <i></i>零件信息
                </div>
            </div>
            <div class="main-area d-b-60" style="top:176px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{buyPlan.tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th width="60" class="text-center">
                                        操作
                                    </th>
                                    <th ng-repeat="itemCol in buyPlan.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="buyPlan.tableConfig.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="buyPlan.formInfo.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{buyPlan.tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in buyPlan.formInfo.materialList track by $index">
                                    <td width="60">
                                        <button type="button" class="btn btn-operate"
                                            ng-click="manualFinish(item.billId, item.materialsNo)"
                                            ng-disabled="!btnPermission.purchasePlanManualFinish || item.finishState == '1' || buyPlan.formInfo.headerInfo.finishState == '2'"
                                            title="{{!btnPermission.purchasePlanManualFinish?'无权限执行此操作':''}}">结单</button>
                                    </td>
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in buyPlan.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                        {{item[itemCol.dataField]}}
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="buyPlan.formInfo.materialList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-default" ng-click="changeTab(0)">返回</button>
            </div>
        </div>
        <div tab heading="缺货新增" active="activeFlag[5]" ng-if="activeFlag[5]">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="searchLack()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearchLackAdd')">
                        高级搜索
                    </button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="零件编号" ng-model="conditionLack.materialsNo">
                        <span class="input-group-addon cursor-pointer" ng-click="searchLack(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearchLackAdd" search-data="searchLack(1)" reset-data="resetLack()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">零件编号：</label>
                        <textarea class="form-control" placeholder="逗号分隔或者换行分隔" ng-model="conditionLack.materialsNos">
                        </textarea>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">采购组：</label>
                        <input type="text" class="form-control" placeholder="采购组" ng-model="conditionLack.purchaseGroup">
                    </div>
                    <div ng-if="isWJ">
                        <div class="form-group clearfix">
                            <label class="control-label"><span translate>单据号</span>：</label>
                            <input type="text" ng-model="conditionLack.billNo" class="form-control">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label"><span translate>客户编号</span>：</label>
                            <input type="text" ng-model="conditionLack.dealerCode" class="form-control">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label"><span translate>客户名称</span>：</label>
                            <input type="text" ng-model="conditionLack.dealerName" class="form-control">
                        </div>
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label"><span translate>制单时间</span>：</label>
                            <input type="text" class="form-control date-picker" ng-model="conditionLack.createStartDate"
                                   datepicker-popup="{{'yyyy-MM-dd'}}"
                                   ng-click="switchDataPicker(0)"
                                   ng-change="checkDate(conditionLack, 'createStartDate', 'createEndDate')"
                                   is-open="datePickerFlag[0]" close-text="关闭" modal-size="small" readonly>
                        </div>
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label"></label>
                            <label class="control-label wave-line">~</label>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label"></label>
                            <input type="text" class="form-control date-picker" ng-model="conditionLack.createEndDate"
                                   datepicker-popup="{{'yyyy-MM-dd'}}"
                                   ng-click="switchDataPicker(1)"
                                   ng-change="checkDate(conditionLack, 'createStartDate', 'createEndDate')"
                                   is-open="datePickerFlag[1]" close-text="关闭" modal-size="small" readonly>
                        </div>                        
                    </div>                   
                </div>
            </div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{lackTableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="text-center th-check border-l-none">
                                        <div yb-check-box yb-checked="markInfoLack.allCheckedBill"
                                            yb-click="selectAllLack(dataListLack, 'Bill')"></div>
                                    </th>
                                    <th ng-repeat="itemCol in lackTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="lackTableConfig.fixedWidth"
                                            fixed-width="tbStyleLack.billFixedWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyleLack.billFixedWidth">
                        <table class="table-fixed border-none" width="{{lackTableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in lackTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="lackTableConfig.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataListLack.length > 0">
                        <table class="table-fixed border-none" width="{{lackTableConfig.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataListLack track by $index"
                                    ng-class="{'row-selected': $index === markInfoLack.cueRow}"
                                    ng-click="selectRowLack($index)">
                                    <td width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="item.isChecked"
                                            yb-click="selectSingleLack(item, dataListLack, 'Bill')"></div>
                                    </td>
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in lackTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span>{{item[itemCol.dataField]}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataListLack.length > 0" ng-style="tbStyleLack.billFixedWidth">
                        <table class="table-fixed border-none" width="{{lackTableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataListLack track by $index"
                                    ng-class="{'row-selected': $index === markInfoLack.curRow}"
                                    ng-click="selectRowLack($index)">
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in lackTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span>{{item[itemCol.dataField]}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataListLack.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar text-center wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm pull-left" yb-checked="markInfoLack.allCheckedBill"
                    yb-check-name="全选" yb-click="selectAllLack(dataListLack, 'Bill')"></div>
                <button type="button" class="btn btn-primary" ng-disabled="buyPlan.formInfo.materialList.length==0"
                    ng-click="nextStep()">下一步
                </button>
                <div yb-page-info ng-model="pageInfoLack" yb-refresh="searchLack()"></div>
            </div>
        </div>
        
        <div tab heading="补库汇总新增" active="activeFlag[6]" ng-if="activeFlag[6]">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="searchLackAll()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                    </div>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="零件编号" ng-model="conditionLackAll.materialsNo">
                        <span class="input-group-addon cursor-pointer" ng-click="searchLackAll(1)">搜索</span>
                    </div>
                </div>
            </div>

            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{lackCollectTableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="text-center th-check border-l-none">
                                        <div yb-check-box yb-checked="markInfoLack.allCheckedBill"
                                            yb-click="selectAllLack(dataListLackAll, 'Bill')"></div>
                                    </th>
                                    <th ng-repeat="itemCol in lackCollectTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="lackCollectTableConfig.fixedWidth"
                                            fixed-width="tbStyleLack.billFixedWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyleLack.billFixedWidth">
                        <table class="table-fixed border-none" width="{{lackCollectTableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in lackCollectTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="lackCollectTableConfig.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataListLackAll.length > 0">
                        <table class="table-fixed border-none" width="{{lackCollectTableConfig.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataListLackAll track by $index"
                                    ng-class="{'row-selected': $index === markInfoLack.cueRow}"
                                    ng-click="selectRowLack($index)">
                                    <td width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="item.isChecked"
                                            yb-click="selectSingleLack(item, dataListLackAll, 'Bill')"></div>
                                    </td>
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in lackCollectTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span>{{item[itemCol.dataField]}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataListLackAll.length > 0" ng-style="tbStyleLack.billFixedWidth">
                        <table class="table-fixed border-none" width="{{lackCollectTableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataListLackAll track by $index"
                                    ng-class="{'row-selected': $index === markInfoLack.curRow}"
                                    ng-click="selectRowLack($index)">
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in lackCollectTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span>{{item[itemCol.dataField]}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataListLackAll.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar text-center wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm pull-left" yb-checked="markInfoLack.allCheckedBill"
                    yb-check-name="全选" yb-click="selectAllLack(dataListLackAll, 'Bill')"></div>
                <button type="button" class="btn btn-primary" ng-disabled="buyPlan.formInfo.materialList.length==0"
                    ng-click="nextStep()">下一步
                </button>
                <div yb-page-info ng-model="pageAllInfoLack" yb-refresh="searchLackAll()" page-size-options="[10, 20, 30, 40, 50, 100, 200, 5000]"></div>
            </div>
        </div>
        <div tab heading="紧急汇总新增" active="activeFlag[7]" ng-if="activeFlag[7]">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="searchLackAll()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                    </div>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="零件编号" ng-model="conditionLackAll.materialsNo">
                        <span class="input-group-addon cursor-pointer" ng-click="searchLackAll(1)">搜索</span>
                    </div>
                </div>
            </div>

            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{lackCollectTableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="text-center th-check border-l-none">
                                        <div yb-check-box yb-checked="markInfoLack.allCheckedBill"
                                            yb-click="selectAllLack(dataListLackAll, 'Bill')"></div>
                                    </th>
                                    <th ng-repeat="itemCol in lackCollectTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="lackCollectTableConfig.fixedWidth"
                                            fixed-width="tbStyleLack.billFixedWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyleLack.billFixedWidth">
                        <table class="table-fixed border-none" width="{{lackCollectTableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in lackCollectTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="lackCollectTableConfig.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataListLackAll.length > 0">
                        <table class="table-fixed border-none" width="{{lackCollectTableConfig.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataListLackAll track by $index"
                                    ng-class="{'row-selected': $index === markInfoLack.cueRow}"
                                    ng-click="selectRowLack($index)">
                                    <td width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="item.isChecked"
                                            yb-click="selectSingleLack(item, dataListLackAll, 'Bill')"></div>
                                    </td>
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in lackCollectTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span>{{item[itemCol.dataField]}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataListLackAll.length > 0" ng-style="tbStyleLack.billFixedWidth">
                        <table class="table-fixed border-none" width="{{lackCollectTableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataListLackAll track by $index"
                                    ng-class="{'row-selected': $index === markInfoLack.curRow}"
                                    ng-click="selectRowLack($index)">
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in lackCollectTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span>{{item[itemCol.dataField]}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataListLackAll.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar text-center wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm pull-left" yb-checked="markInfoLack.allCheckedBill"
                    yb-check-name="全选" yb-click="selectAllLack(dataListLackAll, 'Bill')"></div>
                <button type="button" class="btn btn-primary" ng-disabled="buyPlan.formInfo.materialList.length==0"
                    ng-click="nextStep()">下一步
                </button>
                <div yb-page-info ng-model="pageAllInfoLack" yb-refresh="searchLackAll()" page-size-options="[10, 20, 30, 40, 50, 100, 200, 5000]"></div>
            </div>
        </div>
        <div tab heading="驳回汇总" active="activeFlag[8]" ng-if="activeFlag[8] || activeFlag[9]">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="rejectInfo.search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <div class="btn btn-default base-color">
                            <div title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <!-- <li yb-download download-url="exportParam.rejectSumSectionUrl" download-param="exportParam.sectionParam" download-key="rejectSumIds">
                                    <i class="yb-icon ico-export-o"></i> 导出
                                </li> -->
                                <li yb-download download-url="exportParam.rejectSumAllUrl" download-param="rejectInfo.condition" download-duration="3">
                                    <i class="yb-icon ico-export-o"></i> 导出全部
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="采购计划单号" ng-model="rejectInfo.condition.planOrder">
                        <span class="input-group-addon cursor-pointer" ng-click="rejectInfo.search(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in rejectInfo.tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in rejectInfo.tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="rejectInfo.dataList.length > 0">
                        <table class="table-fixed border-none">
                            <tbody>
                                <tr ng-repeat="item in rejectInfo.dataList track by $index">
                                    <td class="spill-dots" ng-repeat="itemCol in rejectInfo.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <div class="font-0" ng-if="itemCol.type === 'operate'"></div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="rejectInfo.dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in rejectInfo.dataList track by $index">
                                    <td class="spill-dots" ng-repeat="itemCol in rejectInfo.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span ng-if="!itemCol.clickFn">{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="rejectInfo.tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="rejectInfo.dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="rejectInfo.pageInfo" yb-refresh="rejectInfo.search()"></div>
            </div>
        </div>
        <div tab heading="详情" active="activeFlag[9]" ng-if="activeFlag[9]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购计划单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.planOrder||'-'}}">
                        {{buyPlan.formInfo.headerInfo.planOrder || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.createName||'-'}}">
                        {{buyPlan.formInfo.headerInfo.createName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请部门：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{buyPlan.formInfo.headerInfo.deptName||'-'}}">
                        {{buyPlan.formInfo.headerInfo.deptName||'-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(buyPlan.formInfo.headerInfo.createDate | YbDate:'yyyy-MM-dd HH:mm:ss')||'-'}}">
                        {{(buyPlan.formInfo.headerInfo.createDate | YbDate:"yyyy-MM-dd HH:mm:ss") || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购方式：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.purchaseTypeChildName ? buyPlan.formInfo.headerInfo.purchaseTypeChildName : (buyPlan.formInfo.headerInfo.typeDesc ||'-')}}">
                        {{buyPlan.formInfo.headerInfo.purchaseTypeChildId ? buyPlan.formInfo.headerInfo.typeDesc + "-" + buyPlan.formInfo.headerInfo.purchaseTypeChildName : buyPlan.formInfo.headerInfo.typeDesc}}
                    </div>
                </div>
                <!-- <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">供货商：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.supplierName ||'-'}}">
                        {{buyPlan.formInfo.headerInfo.supplierName || "-"}}
                    </div>
                </div> -->
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{buyPlan.formInfo.headerInfo.note ||'-'}}">
                        {{buyPlan.formInfo.headerInfo.note || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.auditName ||'-'}}">
                        {{buyPlan.formInfo.headerInfo.auditName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(buyPlan.formInfo.headerInfo.auditDate | YbDate:'yyyy-MM-dd HH:mm:ss')||'-'}}">
                        {{(buyPlan.formInfo.headerInfo.auditDate | YbDate:'yyyy-MM-dd HH:mm:ss')|| "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(buyPlan.formInfo.headerInfo.auditStatus | ProgressStatus:'audit')||'-'}}">
                        {{(buyPlan.formInfo.headerInfo.auditStatus | ProgressStatus:'audit')|| "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核意见：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{buyPlan.formInfo.headerInfo.auditNote ||'-'}}">
                        {{buyPlan.formInfo.headerInfo.auditNote || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">是否创建采购单：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(buyPlan.formInfo.headerInfo.sendStatus | TrueOrFalse) ||'-'}}">
                        {{(buyPlan.formInfo.headerInfo.sendStatus | TrueOrFalse)|| "-"}}
                    </div>
                </div>
            </div>
            <div class="panel-bar clearfix">
                <div class="pull-left">
                    <i></i>零件信息
                </div>
            </div>
            <div class="main-area d-b-60" style="top:176px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{buyPlan.tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in buyPlan.tableConfig.tableCol track by $index" width="{{itemCol.width}}">
                                        <div yb-thead-operate ng-model="itemCol"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="buyPlan.formInfo.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{buyPlan.tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in buyPlan.formInfo.materialList track by $index">
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in buyPlan.tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                        {{item[itemCol.dataField]}}
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="buyPlan.formInfo.materialList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-default" ng-click="changeTab(8)">返回</button>
            </div>
        </div>
    </div>
</div>